#!/usr/bin/env node

/**
*  android  变色龙插件管理工具
*/


var reqs  = require('./lib/check_reqs'),
plugin = require('./lib/plugin');
args  = process.argv;

if(args[2] == '--help' ||
  args[2] == '/?' ||
  args[2] == '-h' ||
  args[2] == 'help' ||
  args[2] == '-help' ||
  args[2] == '/help') {
    plugin.help();
  } else {
    reqs.run().done(function() {
      return plugin.run(args.slice(2));
    }, function(err) {
      console.error(err);
      process.exit(2);
    });
  }